<template>
  <div class="person">
    <!-- 
      12 回顾ts中的接口泛型
    -->

  </div>
</template> 

<script setup lang="ts" name="Pserson234">
// PersonInter 是一种规范,约束 不是具体的值
import  { type PersonInter, type Persons } from '@/types'

let person:PersonInter = {
  id: 'asd001',
  name: '张三',
  age: 20
}

let personList:Persons = [
  {
    id: 'asd0011231',
    name: '张三1',
    age: 21
  },
  {
  id: 'asd001222222',
  name: '张三2',
  age: 20
  },
  {
    id: 'asd0013333',
    name: '张三3',
    age: 23
  }
]

// let personList:PersonInter[] = [
//   {
//     id: 'asd0011231',
//     name: '张三1',
//     age: 21
//   },
//   {
//   id: 'asd001222222',
//   name: '张三2',
//   age: 20
//   },
//   {
//     id: 'asd0013333',
//     name: '张三3',
//     age: 23
//   }
// ]







</script>
<style>
.person {
  background-color: blue;
  box-shadow: 0 0 10px;
  padding: 20px;
}
button {
  margin: 0 5px;

}
</style>